<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title>Vue文档预览器</title>
    <meta name="description" content="基于Vue2的离线文档预览器，支持PDF、DOCX、PPTX、XLSX等格式">
    <style>
      /* 预加载样式，避免闪烁 */
      #app {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
      }
      .loading-screen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #f5f5f5;
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
      }
      .loading-spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #e0e0e0;
        border-top: 4px solid #2196F3;
        border-radius: 50%;
        animation: spin 1s linear infinite;
      }
      @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
      }
    </style>
  </head>
  <body>
    <noscript>
      <strong>很抱歉，这个应用需要JavaScript支持才能正常运行。请启用JavaScript后重试。</strong>
    </noscript>
    <div id="app">
      <div class="loading-screen">
        <div class="loading-spinner"></div>
      </div>
    </div>
    <!-- PDF.js库 -->
    <script src="/lib/pdf.min.js"></script>
    <script>
      // 设置PDF.js worker
      if (typeof pdfjsLib !== 'undefined') {
        pdfjsLib.GlobalWorkerOptions.workerSrc = '/lib/pdf.worker.js';
      }
    </script>
    
    <!-- JSZip库 - PPTX预览需要 -->
    <script src="/lib/jszip.min.js"></script>
    
    <!-- Mammoth库 - DOCX预览需要 -->
    <script src="/lib/mammoth.min.js"></script>
    
    <!-- XLSX库 - Excel预览需要 -->
    <script src="/lib/xlsx.full.min.js"></script>
    
    <!-- Excel专业查看器 -->
    <script src="/lib/excel-viewer.js"></script>
    
    <!-- Office预览器 -->
    <script src="/lib/office-viewer.js"></script>
    <!-- built files will be auto injected -->
  </body>
</html>
